package com.example.demo2.controller;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Description : 类描述
 * Created by cyd on 2021-05-10 23:57:29
 */
public class MyRedirectServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String result = "http://www.baidu.com";
        resp.sendRedirect(result);
    }
}
